<h3>Thêm mới nhà cung cấp</h3>

<?php echo validation_errors() ?>
  
<form name="createform" method="post" action="<?php echo base_url()?>index.php/provider/create" enctype="multipart/data-form"> 
	<p></p>
	 <table cellpadding = '7'>
		<tr>
			<td><label for = "name">Tên công ty</label></td>
			<td><input type="text" name="name"/></td>
		</tr>
		<tr>
			<td>Logo</td>
			<td>
				<input type = "file" name = "logo" >
			</td>
		</tr>
		<tr>
			<td><label>Số điện thoại</label></td>
			<td><input type="text" name="phone"/></td>
		</tr>
		<tr>
			<td><label for = "email">Email</label></td>
			<td><input type="text" name="email"/></td>
		</tr>

		<tr>
			<td><label for = "address">Địa chỉ</label></td>
			<td><input type="text" name="address"/></td>
		</tr>
		<tr>
			<td><label for = "district">Quận</label></td>
			<td><input type="text" name="district"	/></td>
		</tr>
		<tr>
			<td><label for = "province">Tỉnh/thành phố</label></td>
			<td><input type="text" name="province" /></td>
		</tr>
		<tr>
			<td><label for = "country">Quốc gia</label></td>
			<td><input type="text" name="country" /></td>
		</tr>
		<tr>
			<td>Bản đồ</td>
			<td>
				<input type = "file" name = "map" >
			</td>
		</tr>
		<tr>
		<td><label for= "introduction">Công ty giới thiệu</label></td>
		<td><textarea name = "introduction">
		</textarea></td>	
		</tr>

		<tr>
		<td><label for= "policy">Điều khoản sử dụng</label></td>
		<td><textarea name = "policy"> </textarea></td>	
		</tr>

		<tr>
		<td><label for= "userPolicy">Lưu ý khách hàng</label></td>
		<td><textarea name="userPolicy"> </textarea></td>	
		</tr>

		<tr>
			<td><label>Danh mục</label></td>
			<td>
				<?php foreach ($list_category as $item): ?>
					<input type = 'checkbox'  name = "<?php echo 'cate'.$item['id'];?>" value = '<?php echo $item['id'];?>'>
					<?php echo $item['categoryName']; ?>
				<?php endforeach;?>
			</td>
		</tr>
		<tr>
			<td><label>Chế độ giảm giá</label></td>
			<td>
				<?php foreach ($list_pricePolicy as $item): ?>
					<input type = 'checkbox' name = "<?php echo 'pp'.$item['id'];?>" value = '<?php echo $item['id'];?>'>
					<?php echo $item['value']; ?>
				<?php endforeach;?>
			</td>
		</tr>
		<tr>
			<td><label>Chế độ thời gian</label></td>
			<td>
				<?php foreach ($list_timePolicy as $item): ?>
					<input type = 'checkbox' name = "<?php echo 'tp'.$item['id'];?>" value = '<?php echo $item['id'];?>'>
					<?php echo $item['value']; ?>
				<?php endforeach;?>
			</td>
		</tr>

		<tr>
		<td><label for= "status">Trạng thái</label></td>
		<td>
			<select name = 'status'>
				<option value = 'Active'>Active</option>
				<option value = 'Deactive'>Deactive</option>
			</select>
		</td>	
		</tr>
		<tr>
		<td><label for= "level">Cấp</label></td>
		<td>
			<input type="text" name="level" />
		</td>	
		</tr>
		<input type="hidden" value="create" name="create">
		<tr><td>
		<input type="submit" name="submit" value="Lưu" />
		</td></tr>
	</table>
</form>
